﻿using System;
namespace SXFramWork.Core
{
    /// <summary>
    /// 设置web菜单权限
    /// </summary>
    [AttributeUsage(AttributeTargets.Method, AllowMultiple = false, Inherited = false)]
    public class MenuAttribute:Attribute
    {
        /// <summary>
        /// 设置web菜单权限
        /// </summary>
        /// <param name="title">菜单名称</param>
        /// <param name="menu_url">菜单路径</param>
        public MenuAttribute(string title, string menu_url = "/")
        {
            this.Title = title;
            this. MenuUrl= menu_url;
        }
        /// <summary>
        /// 菜单名称
        /// </summary>
        public string Title { get; set; }
        /// <summary>
        /// 菜单路径  /admin/sysuser/list
        /// </summary>
        public string MenuUrl { get; set; }
        /// <summary>
        /// 菜单编码 admin_sysuser_list
        /// </summary>
        public string Code { get; set; }
        /// <summary>
        /// 上级id
        /// </summary>
        public string ParentId { get; set; } = "0";
    }
}
